﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Newtonsoft.Json;


public partial class PersonInfoControl : System.Web.UI.UserControl
{


    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public PersonInfo PostedPersonInfo
    {
        get
        {
            var hiddenFieldName = this.hiddenPersonInfoControlData_CC4493FF_29A4_4511_B5A3_FBB261A59D4F.Name;

            var q = Request.Form[hiddenFieldName];

            //JsonSerializer serializer = new JsonSerializer();
            //var oPersonInfo = JsonConvert.DeserializeObject<PersonInfoControl.PersonInfo>(q);

            var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            var oPersonInfo = (PersonInfo)serializer.Deserialize<PersonInfo>(q);

            return oPersonInfo;
        }
    }


    public class PersonInfo
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }

    }
}
